package com.ruoyi.chiwen.service.impl;

import java.util.List;

import com.ruoyi.chiwen.domain.TbQualification;
import com.ruoyi.chiwen.mapper.TbQualificationMapper;
import com.ruoyi.chiwen.service.ITbQualificationService;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 资质申请Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-07-30
 */
@Service
public class TbQualificationServiceImpl implements ITbQualificationService
{
    @Autowired
    private TbQualificationMapper tbQualificationMapper;

    /**
     * 查询资质申请
     * 
     * @param id 资质申请ID
     * @return 资质申请
     */
    @Override
    public TbQualification selectTbQualificationById(Long id)
    {
        return tbQualificationMapper.selectTbQualificationById(id);
    }

    /**
     * 查询资质申请列表
     * 
     * @param tbQualification 资质申请
     * @return 资质申请
     */
    @Override
    public List<TbQualification> selectTbQualificationList(TbQualification tbQualification)
    {
        return tbQualificationMapper.selectTbQualificationList(tbQualification);
    }

    /**
     * 新增资质申请
     * 
     * @param tbQualification 资质申请
     * @return 结果
     */
    @Override
    public int insertTbQualification(TbQualification tbQualification)
    {
        tbQualification.setCreateTime(DateUtils.getNowDate());
        return tbQualificationMapper.insertTbQualification(tbQualification);
    }

    /**
     * 修改资质申请
     * 
     * @param tbQualification 资质申请
     * @return 结果
     */
    @Override
    public int updateTbQualification(TbQualification tbQualification)
    {
        tbQualification.setUpdateTime(DateUtils.getNowDate());
        return tbQualificationMapper.updateTbQualification(tbQualification);
    }

    /**
     * 批量删除资质申请
     * 
     * @param ids 需要删除的资质申请ID
     * @return 结果
     */
    @Override
    public int deleteTbQualificationByIds(Long[] ids)
    {
        return tbQualificationMapper.deleteTbQualificationByIds(ids);
    }

    /**
     * 删除资质申请信息
     * 
     * @param id 资质申请ID
     * @return 结果
     */
    @Override
    public int deleteTbQualificationById(Long id)
    {
        return tbQualificationMapper.deleteTbQualificationById(id);
    }
}
